<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>对已编码的 URL 字符串进行解码</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.rawurldecode" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">rawurldecode</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">rawurldecode</span> &mdash; <span class="dc-title">对已编码的 URL 字符串进行解码</span></p>

 </div>
 
  <div class="refsect1 description" id="refsect1-function.rawurldecode-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>rawurldecode</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$str</code></span>
   ) : <span class="type">string</span></div>

  <p class="para rdfs-comment">
   返回字符串，此字符串中百分号（<em>%</em>）后跟两位十六进制数的序列都将被替换成原义字符。
  </p>
 </div>

 
  <div class="refsect1 parameters" id="refsect1-function.rawurldecode-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<code class="parameter">str</code></dt>

     <dd>

      <p class="para">
       要解码的 URL。
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


  <div class="refsect1 returnvalues" id="refsect1-function.rawurldecode-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   返回解码后的 URL 字符串。
  </p>
 </div>


  <div class="refsect1 examples" id="refsect1-function.rawurldecode-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-4893">
    <p><strong>Example #1 <span class="function"><strong>rawurldecode()</strong></span> 示例</strong></p>
    <div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">rawurldecode</span><span style="color: #007700">(</span><span style="color: #DD0000">'foo%20bar%40baz'</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//&nbsp;foo&nbsp;bar@baz<br /><br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
    </div>

   </div>
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-function.rawurldecode-notes">
  <h3 class="title">注释</h3>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <p class="para">
   <span class="function"><strong>rawurldecode()</strong></span> 不会把加号（&#039;+&#039;）解码为空格，而
    <span class="function"><a href="urldecode.html" class="function">urldecode()</a></span> 可以。
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.rawurldecode-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="rawurlencode.html" class="function" rel="rdfs-seeAlso">rawurlencode()</a> - 按照 RFC 3986 对 URL 进行编码</span></li>
    <li class="member"><span class="function"><a href="urldecode.html" class="function" rel="rdfs-seeAlso">urldecode()</a> - 解码已编码的 URL 字符串</span></li>
    <li class="member"><span class="function"><a href="urlencode.html" class="function" rel="rdfs-seeAlso">urlencode()</a> - 编码 URL 字符串</span></li>
    <li class="member"><a href="http://www.faqs.org/rfcs/rfc3986" class="link external">&raquo;&nbsp;RFC 3986</a></li>
   </ul>
  </p>
 </div>

 
</div></div></div></body></html>